<template>
  <div>
    <el-table
      :data="tableData"
      border
      style="width: 100%">
      <el-table-column
        fixed
        prop="Asno"
        label="学生编号"
        width="150">
      </el-table-column>
      <el-table-column
        prop="Acno"
        label="科目编号"
        width="120">
      </el-table-column>
      <el-table-column
        prop="Aclass_cno"
        label="班级代号"
        width="120">
      </el-table-column>
      <el-table-column
        prop="Adate"
        label="交款时间"
        width="180">
      </el-table-column>
      <el-table-column
        prop="Aamount"
        label="交款额"
        width="120">
      </el-table-column>
    </el-table>
    <el-pagination
      background
      layout="prev, pager, next"
      page-size="6"
      :total="total"
      @current-change="page">
    </el-pagination>
  </div>
</template>

<script>
export default {
  methods: {
    page(){
      const _this = this
      this.axios.post('http://localhost:8152/api/auth/accounts/findall').then(function (resp) {
        _this.tableData = resp.data
        _this.total = resp.data
      })
    }
  },
  created () {
    const _this = this;
    this.axios.post('http://localhost:8152/api/auth/accounts/findall').then((res) => {
      _this.tableData = res.data
      //_this.total = res.data.totalElements
    })
  },
  data() {
    return {
      total:null,
      tableData:null
    }
  }
}
</script>
